package com.xjh.basestudy.designmode.behaviorMode.behaviorMode3_ChainOfResponsibility.p1_origin;

/**
 * @Author XuJianHua
 * @Date 2022/10/4 14:31
 * @Description 财务专员类Staff

 */
public class Staff {

    private String name;

    public Staff(String name) {
        this.name = name;
    }

    public boolean approve(int amount) {
        if (amount <= 1000) {
            System.out.println("审批通过。【专员：" + name + "】");
            return true;
        } else {
            System.out.println("无权审批，请找上级。【专员：" + name + "】");
            return false;
        }
    }

}